package changceilingcolor003;

import java.util.ArrayList;

public class AttractionInteractionHolder {

	
	ArrayList<AttractionInteractionProperties> m_InteractionContrainer = null;
	public AttractionInteractionHolder (ArrayList<AttractionInteractionProperties> InteractionContrainer)
	{
		m_InteractionContrainer = InteractionContrainer;
	}
	
	
	public AttractionInteractionProperties GetAttractorProperties(String Attractor1Id,String Attractor2Id)
	{
		if(m_InteractionContrainer != null)
		for (int i =0; i < m_InteractionContrainer.size(); ++i )
		{
			AttractionInteractionProperties InteractionElement = m_InteractionContrainer.get(i); 
			
			if(   (InteractionElement.m_Attractor1.equals(Attractor1Id) && InteractionElement.m_Attractor2.equals(Attractor2Id)) ||
			    (InteractionElement.m_Attractor1.equals(Attractor2Id) && InteractionElement.m_Attractor2.equals(Attractor1Id)) )
			{
				return InteractionElement; 
			}
		}
		return null;
	}
}
